package asteroids.exception;
import be.kuleuven.cs.som.annotate.*;

/**
 * A class for signaling illegal duration.
 * 
 * @version  1.0
 * @author   Thomas Provoost, Jeroen Gillis
 */
public class IllegalDurationException extends RuntimeException {

	
	private static final long serialVersionUID = 1L;
	
	/**
	 * Variable registering the duration involved in this illegal duration
	 * exception.
	 */
	private final double duration;

	/**
	 * Initialize this new illegal duration exception
	 * 
	 * @param  duration
	 *         The duration for this new illegal duration exception.
	 * @post   The duration of this new illegal denominator exception is equal
	 *         to the given value.
	 *       | new.getDuration() == duration
	 */
	public IllegalDurationException(double duration) {
		this.duration = duration;
	}

	/**
	 * Return the duration registered for this illegal duration exception.
	 */
	@Basic @Immutable
	public double getDuration() {
		return this.duration;
	}
	}